package com.cjm.one.goods.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cjm.one.model.common.ImportResult;
import com.cjm.one.model.goods.dto.GoodsInfoDto;
import com.cjm.one.model.goods.entity.GoodsInfo;
import com.cjm.one.model.goods.enums.SortStrategyEnum;
import com.cjm.one.model.goods.vo.GoodsInfoVo;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
* @author 29289
* @description 针对表【goods_info】的数据库操作Service
* @createDate 2024-09-05 16:07:00
*/
public interface GoodsInfoService extends IService<GoodsInfo> {

    Page<GoodsInfo> pageList(Page<GoodsInfoVo> page, String name, Long categoryId);

    Boolean saveGoodsInfo(GoodsInfoDto goodsInfoDto);

    Boolean updateGoodsInfoById(GoodsInfoDto goodsInfoDto);

    Boolean removeGoodsInfoById(Long id);

    GoodsInfoVo getGoodsInfoById(Long id );


    List<GoodsInfo> listBatch(Long[] ids);

    void exportGoods(List<Long> ids, HttpServletResponse response) throws IOException;

    ImportResult importGoods(MultipartFile file) throws IOException;
}
